import { createRouter, createWebHistory } from "vue-router";
import HomeView from "../views/HomeView/HomeView.vue"; // 导入你的组件
import login from "../views/login/login.vue"; // 导入你的组件
const routes = [
  {
    path: "/",
    name: "login",
    component: login,
  },
  {
    path: "/home",
    name: "home",
    component: HomeView,
  },
  //   {
  //     path: '/about',
  //     name: 'about',
  //     // 路由级代码拆分
  //     // 这会为此路由生成一个单独的块 (about.[hash].js)
  //     component: () => import('../views/AboutView.vue')
  //   }
];

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
});

export default router;
